<layout name="layout" />

    <div class="pageheader notab">
        <h1 class="pagetitle">推广宝贝</h1>
        <span class="pagedesc">请谨慎选择推广宝贝和推广标题，以免违规，详细规则请认真参考<a>《淘宝直通车软件服务使用规范》</a>，十禾快车不承担因推广宝贝、推广标题违禁所造成的损失</span>
    </div><!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
        <div class="contenttitle2 nomargintop">
            <h3 id="campaign_title">{$adgroup.title}详细推广设置</h3>
        </div><!--contenttitle-->

        <div class="adgroup_info" style="overflow:hidden;">
            <div class="one_half">
            
            
                <div class="widgetcontent padding0 statement">
                   <table cellspacing="0" cellpadding="0" border="0" class="stdtable">
                        <colgroup>
                            <col class="con0">
                            <col class="con1">
                            <col class="con0">
                        </colgroup>
                        <thead>
                            <tr>
                                <th colspan="3" class="head0">{$adgroup.title}</th>
                            </tr>
                        </thead>
                        <tbody>
                             <tr>
                                <td>所属推广计划</td>
                                <td colspan="2">{$campaign.title}</td>
                            </tr>                           
                            <tr>
                                <td>产品售价</td>
                                <td colspan="2">￥{$product.price}</td>
                            </tr>

                            <tr>
                                <td>所属类目</td>
                                <td colspan="2">{$adgroup.cats_str}</td>

                            </tr>


                            <tr>
                                <td>默认出价</td>
                                <td>￥{$adgroup.default_price}</td>
                                <td><a href="javascript:void(0);">修改</a></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                
            </div>
            
            
            <div class="one_half last">
           
                <img src="{$product.pic_url}" />
            
            
            </div>
        </div>
        
            <br class="clear"/>

            <div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
                <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
                    <li class="ui-state-default ui-corner-top ui-state-active"><a href="/adgroup/keywords">关键词设置</a></li>
                    <li class="ui-state-default ui-corner-top"><a href="/adgroup/nonsearchs" >定向投放</a></li>
                    <li class="ui-state-default ui-corner-top"><a href="/adgroup/creatives">推广标题与图</a></li>
                </ul>


            <div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tabs-1">

            
            </div>
            
        </div>                                    
    </div>
    
<script type="text/javascript">
    
(function($) {

    CampaignManage = function(options_){
        var options = {};
        
        var tabs = [];
        
        var selected_tab = null;
        
        var params = {};
        
        function init(opts){
            initTabs();
            //updateContent($(selected_tab).attr('href'));
        }
                
        function initTabs(tab_id){
            tabs = $("#tabs").find("ul li a");
            tabs.each(function(idx,ele){
                if(!selected_tab) selected_tab = ele;
                $(ele).bind("click" , function(){
                    selected_tab = this;
                    checkTabsStats();
                    updateContent($(this).attr('href'));
                    return false;
                });
            });
        }
        
        function checkTabsStats(){
            tabs.each(function(idx,ele){
                $(ele).parent().removeClass("ui-state-active");
                $(selected_tab).parent().addClass("ui-state-active");
            });
                        
        }
        
        function updateContent(url,target){
            $("#tabs-1").html('<img src="/Img/ajax-loader.gif" />');
            wt.post(url , params , function(r){
                $("#tabs-1").html(r);
            });
        }
        
        function getParams(){
            return {};
        }
        
        
        
        init(options_);
    }
    
    $.icampaign = function(options_) {
        //var t0 = new Date();
        var campaignmanage = new CampaignManage(options_);
        return campaignmanage;
    };
})(jQuery);

jQuery(function () {
    var mymanage = $.icampaign();
    //clear the pager;
	$("#table_pager").empty();    
});
</script>